#if !defined(AFX_COUNTVIEW_H__1B26F79C_7F18_47DC_BAAC_93E7B8EA5D48__INCLUDED_)
#define AFX_COUNTVIEW_H__1B26F79C_7F18_47DC_BAAC_93E7B8EA5D48__INCLUDED_

#include "SOURCE\FlatHeaderCtrl.h"	// Added by ClassView
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// CountView.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CCountView form view

#ifndef __AFXEXT_H__
#include <afxext.h>
#endif
#include "SOURCE\NSChartCtrl.h"	// Added by ClassView
#include "financedef.h"	// Added by ClassView

class CCountView : public CFormView
{
protected:
	CCountView();           // protected constructor used by dynamic creation
	DECLARE_DYNCREATE(CCountView)

// Form Data
public:
	//{{AFX_DATA(CCountView)
	enum { IDD = IDD_FORM_COUNT };
	CListCtrl	m_LstCount;
	//}}AFX_DATA

// Attributes
public:

// Operations
public:
	void RefreshCountView();

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CCountView)
	public:
	virtual void OnInitialUpdate();
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual void OnActivateView(BOOL bActivate, CView* pActivateView, CView* pDeactiveView);
	//}}AFX_VIRTUAL

// Implementation
protected:
	virtual ~CCountView();
#ifdef _DEBUG
	virtual void AssertValid() const;
	virtual void Dump(CDumpContext& dc) const;
#endif

	// Generated message map functions
	//{{AFX_MSG(CCountView)
	afx_msg void OnPurposeChartSelectedItem(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnFlowChartSelectedItem(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnSetup();
	afx_msg void OnRdoPie();
	afx_msg void OnRdoBar();
	afx_msg void OnColumnclickLstCount(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnRdoAbsval();
	afx_msg void OnRdoPercent();
	afx_msg void OnDblclkLstCount(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnSearch();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
private:
	void CountByOwner();
	CNSChartCtrl m_chartOwner;
	INT m_ordercolumn;
	DISPORDER m_disporder;
	CFlatHeaderCtrl m_FlatHeader;
	void CountByPurpose();
	void GetDateRange();
	void CountByFlow();
	CHAR m_chDateRange[256];
	_CommandPtr m_pCommand;
	INT m_iCountType;	// Expense, Income, Bank, Invest
	INT m_iChartStyle;	// Pie or Bar
	CNSChartCtrl m_chartFlow;
	CNSChartCtrl m_chart;
};

/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_COUNTVIEW_H__1B26F79C_7F18_47DC_BAAC_93E7B8EA5D48__INCLUDED_)
